<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
    gc();

    var text = document.createElementNS("http://www.w3.org/2000/svg", "text");

    var initialNumberOfNodes;
    if (internals)
        initialNumberOfNodes = internals.numberOfLiveNodes();

    var rotate = text.rotate;
    text = null;

    gc();
    // Assert that the <text> svg element is alive while a tear-off is alive.
    if (internals)
        shouldBe('internals.numberOfLiveNodes()', 'initialNumberOfNodes');

    // Accessing to properties of deleted SVGElement should not cause crash
    rotate;
    rotate.animVal;
    try { rotate.animVal.getItem(0); } catch(e) {}
</script>
<div>PASS: Did not crash.</div>
</body>
</html>
